<div id="center_tieude">
  <img class="hinhds" src="./Picture/cart.png"   />
  <h3>Giỏ Hàng</h3>        
</div> <!--end center_tieude-->

<div id="center_noidung">
	<form action="" method="post" enctype="multipart/form-data">
        <table border="1px" cellspacing="0px" width="558px">
            <tr>
            	<th>Tên Sản Phẩm</th>
            	<th>Số lượng</th>
            	<th>Đơn giá</th>
                <th colspan="2"><a href="./index.php?obj=trangchu"><img src="./Picture/home.png" title="home"></a></th>
            </tr>
            <?php
				$arr_tien= array();
				$iddh=donhang::GetId_ByUser($_SESSION['curUser']);
				$arr_idspdh=chitietdonhang::GetAll_ById($iddh->idDonHang);
				for($i=0;$i<count($arr_idspdh);$i++)
				{
					$arr=sanpham::GetSP_byId($arr_idspdh[$i]->idSanPham);
					
					?>
					<tr>
						<td><?php echo $arr->Ten; ?></td>
                        <td ><input type="text" value="<?php echo $arr_idspdh[$i]->SoLuong; ?>" name="sl" style="text-align:center"/></td>
                        <td><?php echo $arr->Gia; ?></td>
                        <td><input type="submit" value="Cập nhật" name="capnhatgh"> </td>
                        <td><a href="./admin.php?obj=giohang&act=delete&iddh=<?php echo $iddh->idDonHang ?>&id=<?php echo $arr->idSanPham ?> ">
                    <img title="Xóa sản phẩm" src="./Picture/del.png"/>
                </a></td>
					</tr>
                    
          <?php 	//$arr_tien[$i]=
				}?>
                <tr>
                	<th></th>
                    <th colspan="4">Tổng tiền:
                    	<?php
							$kq=donhang::GetAll_ById($iddh->idDonHang);
                        	echo $kq->TongTien;
						?>
                    </th>
                </tr>
        </table>
	</form>
</div>